package com.ecar.common.dto;

import com.ecar.common.util.JSONSerialization;

import javax.xml.bind.annotation.XmlRootElement;

/**
 * 接口返回
 * @author admin
 */
@XmlRootElement
public class DataBeanEcar implements JSONSerialization {

	/**
	 * 返回码
	 * 
	 * <pre>
	 * 响应状态
	 * 		200:成功
	 * 		400:参数错误
	 * 		403:禁止请求
	 * 		404:资源或对象未找到
	 * 		500:服务器端出现异常
	 * </pre>
	 **/
	private int code;

	private Object result;

	private String message;
	
	private Integer totalCount;
	
	public Integer getTotalCount() {
		return totalCount;
	}

	public void setTotalCount(Integer totalCount) {
		this.totalCount = totalCount;
	}

	public Integer getPageCount() {
		return pageCount;
	}

	public void setPageCount(Integer pageCount) {
		this.pageCount = pageCount;
	}

	private Integer pageCount;

    public DataBeanEcar() {
		this.code = 200;
		this.result = null;
	}

	public DataBeanEcar(String result) {
		this.code = 200;
		this.result = result;
	}

	public DataBeanEcar(int code, Object result) {
		this.code = code;
		this.result = result;
	}
	
	public DataBeanEcar(int code, Object result, String message) {
		super();
		this.code = code;
		this.result = result;
		this.message = message;
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public Object getResult() {
		return result;
	}

	public DataBeanEcar(int code, Object result, String message, Integer totalCount, Integer pageCount) {
		super();
		this.code = code;
		this.result = result;
		this.message = message;
		this.totalCount = totalCount;
		this.pageCount = pageCount;
	}

	public void setResult(Object result) {
		this.result = result;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

}
